package csu.web.dining.web.servlet;

import csu.web.dining.service.CatalogService;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;

import java.io.IOException;

public class CategoryFormServlet extends HttpServlet {
    private CatalogService catelogService;
    private static final String CATEGORY_FROM="/WEB-INF/jsp/catelog/category.jsp";

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
       String categoryId= req.getParameter("categoryId");
       catelogService=new CatalogService();
       //Category category=catelogService.getCategory(categoryId);
       //List<Product> productlist=catelogService.getProductListByCategory(categoryId);
       HttpSession session=req.getSession();
       //session.getAttribute("category",category);
        //session.getAttribute("productList",productlist);
        req.getRequestDispatcher(CATEGORY_FROM).forward(req,resp);
    }
}
